
import 'dart:ui';

import 'package:myturngame/bean/role.dart';

import 'combat/damage.dart';

///战斗中的角色属性
class RoleInCombat {
  Role role;
  int index;
  //角色还未分配指令
  bool isNotAllotCommand = true;
  int team;
  static int teamEnemy = 1;
  static int teamUs = 2;

  ///即将展示所受到的伤害
  // Damage? damageToShow;
  List<Damage> damageListToShow = [];

  ///移动动画
  Offset? targetOffset;

  ///负增益deBuff
  Map<String,int> deBuff = {};

  RoleInCombat(this.role, this.index,this.team);

  String teamStr(){
    if(team == teamEnemy){
      return "敌方";
    }else{
      return "我方";
    }
  }

  ///角色可以行动
  bool canAction(){
    return role.hp > 0;
  }
}